//package com.spic.business.config.rabbitmq;
//
//import com.spic.business.constant.RabbitMQConstant;
//import org.springframework.amqp.core.Binding;
//import org.springframework.amqp.core.BindingBuilder;
//import org.springframework.amqp.core.Queue;
//import org.springframework.amqp.core.TopicExchange;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
///**
// * @author 290512
// * @create 2022-05-17 16:01
// */
//@Configuration
//public class RabbitmqConfig
//{
//
//    //配置Exchange
//    @Bean
//    public TopicExchange directExchange() {
//        return new TopicExchange(RabbitMQConstant.EXCHANGE);
//    }
//
//    // 绑定交换机与队列
//    @Bean
//    public Binding getMyqueue(TopicExchange topicExchange) {
//        Queue queue = new Queue(RabbitMQConstant.QUEUE);
//        //key -- 消费用的key
//        return BindingBuilder.bind(queue).to(topicExchange).with(RabbitMQConstant.ROUTING_KEY);
//    }
//
//}
